<template>
  <div class="chat-windows">
    <div style="position: absolute;width: 100%;max-height: 410px;overflow: auto">
      <div class="chat-record" v-for="(i,index) in questionArray.length">
        <p>
          {{ questionArray[i - 1] }}
        </p>
        <p>
          {{ answerArray[i - 1] }}
        </p>
      </div>

    </div>
  </div>
</template>

<script>
import Avatar from "@/components/Note/SparkAi/Avatar.vue";

export default {
  name: "ChatWindows",
  data() {
    return {
      page: 'Avatar',
      questionArray: [],
      answerArray: []
    }
  },
  components: {
    Avatar
  },
  methods: {
    userAsk(val) {
      this.questionArray.push(val)
    },
    aiAnswer(val) {
       this.answerArray.push(val)
    }
  },

}

</script>

<style scoped>
.chat-windows {
  position: absolute;
  background-color: #42b983;
}

.chat-record {
  position: relative;
  max-width: 70%;
}
</style>
